import request from "@/request";
import { AxiosResponse } from "axios";
import { ResponseData } from "@/types/api/public";

export const cols = [
  {
    title: "名称",
    dataIndex: "name",
    key: "name",
  },
  {
    title: "URL",
    dataIndex: "path",
    key: "path",
  },
  {
    title: "标识",
    dataIndex: "key",
    key: "key",
  },
  {
    title: "跳转",
    dataIndex: "redirect",
    customRender: (record: any) => {
      return record.text;
    },
  },
  {
    title: "隐藏",
    key: "hidden",
  },
];

export const doAsync = (data: any) => {
  return request({
    url: "/system/menu/sync",
    method: "post",
    data,
  });
};
